<?php


namespace app\index\controller;

use think\Controller;

class BaseController extends Controller{
    public function __construct(){
        $user = cookie('userData');

        if(!$user){
            $this->error('未登录，先登录','/');
        }
    }
}